@include("user.head")
	<!-- 公共头部 -->
		<div id="content_person">
			<div class="row">
				<div class="col-xs-3">
					@include("user.uc.navigation")

				</div>
				<div class="col-xs-9">
					@if (Session::has("user"))
						@if (Session::get("user")["role_id"] != 1)
						<div class="panel panel-default">
						  <div class="panel-heading">
						    <h3 class="panel-title">
						    	已实名认证
						    </h3>
						  </div>
						  <div class="panel-body">
						  	<div class="dropdown">
								<div class="col-xs-4 col-xs-offset-4 no_padding">
									您已完成实名认证，请勿重复提交！
								</div>
							</div>
						  </div>
						</div>
						@else
						<div class="panel panel-default">
						  <div class="panel-heading">
						    <h3 class="panel-title">
						    	选择认证的用户类型
						    </h3>
						  </div>
						  <div class="panel-body">
						  	<div class="dropdown">
								<div class="col-xs-4 col-xs-offset-4 no_padding">
									<select class="form-control input_size" id="typeId">
										<option value="">请选择</option>
										@foreach ($roles as $role)
										<option value="<%$role['id']%>" @if ($type == $role["id"]) selected="selected" @endif><%$role["role_name"]%></option>
										@endforeach
									</select>
								</div>
							</div>
							<div class="col-xs-12 col-xs-offset-5 no_padding_both marginTop30">
								<button class="btn btn-primary col-xs-2" id="approve">下一步</button>
							</div>
						  </div>
						</div>
						@endif
					@endif
				</div>
			</div>
		</div>
@include("user.footer")
@include("user.common")
<script type="text/javascript">
$("#approve").bind('click', function(){
	var type = $("#typeId").val();
	switch (type)
	{
		case '<%env("ENERGY")%>':
			window.location.href="<%url('uc/energy/validator')%>";
			break;
		case '<%env("SAVER")%>':
			window.location.href="<%url('uc/saver/validator')%>";
			break;
		case '<%env("DEVICE_TECH")%>':
			window.location.href="<%url('uc/devicetech/validator')%>";
			break;
		case '<%env("THIRD")%>':
			window.location.href="<%url('uc/third/validator')%>";
			break;
		case '<%env("ASSOCIATION")%>':
			window.location.href="<%url('uc/ass/validator')%>";
			break;
		case '<%env("GOVERNMENT")%>':
			window.location.href="<%url('uc/gov/validator')%>";
			break;
		default:
			error("", "请选择认证的用户类型!");
			break;
	}
})


</script>
</html>
